<!--
 * @Author: zy
 * @Date: 2022-06-08 09:44:58
 * @LastEditTime: 2022-07-26 22:21:21
 * @Description: 
-->
<script>
  import {
    versionUpdateCheck
  } from './utils'

  //JBolt 内置功能演示
  import JBolt from './utils/jbolt/jbolt.js';
  export default {
    globalData: {
      //限制重复点击跳转
      isGoPage: true,
      getJBolt: function () {
        return JBolt;
      }
    },
    async onLaunch(options) {
      console.log('App Launch', options);
      //this.getJBolt().init();

      // #ifndef H5
      // 小程序 检查版本更新
      versionUpdateCheck()

      // 清空token重新登录
      //await this.$store.dispatch('removeToken')
      //await this.$store.dispatch('removeUserInfo')
      // #endif

      this.$store.dispatch('getDefaultAppInfo')

      await this.$store.dispatch('toLogin')
    },
    onShow(options) {
      console.log('App Show', options)
    },
    onHide() {
      console.log('App Hide')
    }
  }

</script>

<style lang="scss">
  @import "uview-ui/index.scss";
  @import "common/styles/common.scss";

  @import "common/colorui/main.css";
  @import "common/colorui/icon.css";
  @import "common/colorui/style.css";

</style>
